package com.liuli.dao.impl;

import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.liuli.dao.ResumeDao;
import com.liuli.entity.Resume;
import com.liuli.entity.UserInfo;

/**
 * 基本简历信息实现类
 * @author liyunf
 *
 */
@Repository("resumedao")
public class ResumeDaoImpl extends BaseDaoImpl<Resume> implements ResumeDao {

	@Override
	public Resume getResumeByUid(Integer uid) {
     
		String hql = "from Resume where uid=?";

		 Session session =getSession();
		 Resume resume =null;
	      try {
	    	  Query query = session.createQuery(hql);
	    	  query.setParameter(0, uid);
	    	  List<Resume> list = query.list();
	    	  for(Resume r :list){
	    		  resume = r;
	    	  }
			
		} catch (Exception e) {
			 e.printStackTrace();
		}
			return resume; 
	}

}
